/*
 * Parcel.cpp
 *
 *  Created on: Apr 26, 2012
 *      Author: gonzalo
 */

#include "Parcel.h"

Parcel::Parcel() {
	this->rectangle =new SDL_Rect();
}

Parcel::~Parcel() {
	delete this->rectangle;
}


SDL_Rect* Parcel::getRectangle(){
	this->rectangle->x = posX;
	this->rectangle->y = posY;
	this->rectangle->h = height;
	this->rectangle->w = width;

	return this->rectangle;
}


SDL_Rect* Parcel::getRectangleCenter(SDL_Surface* surface){
	getRectangle();

	this->rectangle->x -= (surface->w) / 2;
	this->rectangle->y -= (surface->h) / 2;

	return this->rectangle;
}
